<template>
    <div class="width1200 margin0auto marginTop117 bgWhite">
        <div class="color333 articleTitel width780 margin0auto">
            <el-row>
                <el-col :span="24" style="margin-top:55px;">
                {{initData.title}}
                </el-col>
                <el-col :span="24" class="marginTop10">
                    <el-row class="colorc1" style="font-size:12px" :gutter="20">
                        <el-col :span="3">
                            <span class="iconfont iconyanjing" v-if="initData.saw">&nbsp;{{initData.saw}}</span>
                        </el-col>
                        <el-col :span="4.5">
                            <span class="iconfont iconshijian1" v-if="initData.pdate">&nbsp;{{initData.pdate}}</span>
                        </el-col>
                        <el-col :span="4">
                            <span class="iconfont iconyonghu1" v-if="initData.author">&nbsp;{{initData.author}}</span>
                        </el-col>
                    </el-row>
                </el-col>
                <el-col :span="24" class="marginTop20 paddBottom20 borderBottom">
                    <el-tag size="mini" color="#ECEDEE" style="color:$=#000000">{{initData.tag}}</el-tag>
                </el-col>
                <el-col class="marginTop20" v-html="initData.content">{{initData.content}}</el-col>
            </el-row>
        </div>
    </div>
</template>

<script>
export default {
     data() {
    return {
        initData:[],
    }
     },
    name:'ArticleDetail',
    mounted(){
        this.initDataMethod()
    },
    methods: {
        async initDataMethod(){
            let id = this.$route.query.id;
            let dataObj = {
                'id':id
            }
            const { $api } = this;
          var useData = await $api.user.apiArticleDetail(dataObj);
          if(useData.code==0){
            this.initData =useData.data;
          }else{
            this.$message.error(useData.msg);
          }
        }
    }
}
</script>

<style <style scoped>
.marginTop55{
    margin-top: 55px;
}
.marginTop117{
    margin: 117px auto;
}
.articleTitel{
    font-size:30px;
    font-family:SourceHanSansCN-Regular;
    font-weight:400;
    color:rgba(51,51,51,1);
}
.marginTop55{
    margin-top: 55px;
}
.width780{
    width: 708px;
}
</style>
